$OpenBSD: patch-configure_in_in,v 1.9 2013/01/18 11:37:54 jasper Exp $
--- configure.in.in.orig	Fri Feb  6 20:07:37 2009
+++ configure.in.in	Wed Jan 16 11:07:32 2013
@@ -740,6 +740,37 @@ if test "x$with_esd" != "xno"; then
 	fi
 fi
 
+dnl ___________________ sndio ___________________
+AC_ARG_WITH([sndio],
+	[AC_HELP_STRING([--without-sndio], [force compilation without sndio [default=test]])],
+	[with_sndio=${withval}], [with_sndio=test])
+
+AC_MSG_CHECKING([if sndio support is requested])
+AC_MSG_RESULT($with_sndio)
+
+have_sndio=no
+
+if test "x$with_sndio" != "xno"; then
+	AC_MSG_CHECKING(for sndio support)
+	AC_TRY_COMPILE([
+		#include <sndio.h>
+	],[
+		int arg = SIO_LE_NATIVE;
+	],[
+		have_sndio=yes
+	])
+	
+	if test "x$have_sndio" = "xyes"; then
+		AC_CHECK_LIB(sndio,sio_open,,have_sndio=no,-lsndio)
+	fi
+	
+	AC_MSG_RESULT($have_sndio)
+
+	if test "x$have_sndio" = "xyes"; then
+		AC_DEFINE(USE_SNDIO,1,[sndio detected])
+	fi
+fi
+
 dnl ___________________ OSS ___________________
 AC_ARG_WITH([oss],
 	[AC_HELP_STRING([--without-oss], [force compilation without OSS [default=test]])],
@@ -1153,10 +1184,39 @@ case $host_cpu in
 		AC_DEFINE(HAVE_FAST_64BIT,1,"FFMPEG")
 		echo "IA64"
 		;;
+	alpha)
+		have_little_endian=yes
+		LMPG_OPT="";
+		AC_DEFINE(ARCH_64_BITS,1,"X86_64 AMD64 assembly")
+		AC_DEFINE(FPM_DEFAULT,1,[Mad ])
+		AC_DEFINE(ENABLE_MMX,0,[post proc])
+		echo "ALPHA"
+		;;
+	loongson)
+		have_little_endian=yes
+		LMPG_OPT="";
+		AC_DEFINE(ARCH_64_BITS,1,"X86_64 AMD64 assembly")
+		AC_DEFINE(FPM_DEFAULT,1,[Mad ])
+		AC_DEFINE(ENABLE_MMX,0,[post proc])
+		echo "LOONGSON"
+		;;
+	sgi|mipseb)
+		have_little_endian=no
+		LMPG_OPT="";
+		AC_DEFINE(ADM_BIG_ENDIAN,1,[Big endian CPU - SPARC or PowerPC or MIPS])
+		AC_DEFINE(WORDS_BIGENDIAN,1,[Big endian CPU - SPARC or PowerPC or MIPS])
+		AC_DEFINE(ARCH_64_BITS,1,"X86_64 AMD64 assembly")
+		AC_DEFINE(FPM_DEFAULT,1,[Mad ])
+		AC_DEFINE(ENABLE_MMX,0,[post proc])
+		echo "SGI"
+		;;
 	sparc|sparc64)
 		have_little_endian=no;
 		LMPG_OPT="";
 		AC_DEFINE(ADM_BIG_ENDIAN,1,[Big endian CPU - SPARC or PowerPC])
+		if test "$host_cpu" == "sparc64"; then
+			AC_DEFINE(ARCH_64_BITS,1,"X86_64 AMD64 assembly")
+		fi
 		AC_DEFINE(FPM_SPARC,1,[Mad ])
 		AC_DEFINE(WORDS_BIGENDIAN,1,[Big endian CPU - SPARC or PowerPC])
 		AC_DEFINE(ENABLE_MMX,0,[post proc])
@@ -1173,7 +1233,7 @@ case $host_cpu in
 		AC_DEFINE(ENABLE_MMX,0,[post proc])
 		AC_DEFINE(HAVE_FAST_64BIT,1,"FFMPEG")
 		;;
-	ppc)
+	powerpc)
 		have_little_endian=no;
 		LMPG_OPT="";
 		AC_DEFINE(FPM_PPC,1,[Mad ])       
@@ -1184,7 +1244,7 @@ case $host_cpu in
 		AC_DEFINE(ARCH_POWERPC,1,[Enable PowerPC optim])		
 		AC_ARG_ENABLE(altivec, 
 			AC_HELP_STRING([--enable-altivec], [enable AltiVec acceleration (PowerPC)]),
-			have_altivec=yes)
+			have_altivec=${enableval}, have_altivec=yes)
 		AC_DEFINE(WORDS_BIGENDIAN,1,[Big endian CPU - SPARC or PowerPC])
 		AC_DEFINE(ENABLE_MMX,0,[post proc])       
 		;;
@@ -1321,15 +1381,6 @@ if test "x$use_debug" = "xyes"; then
 	AC_DEFINE(ADM_DEBUG,1,[be verbose])
 	CXXFLAGS="$CXXFLAGS -O1 -g3"
 	CFLAGS="$CFLAGS -O1 -g3"
-else
-	dnl -- built-in means gcc3, for gcc 2 we stick to -O2 --
-	if test "x$use_builtin" = "xyes"; then
-		CXXFLAGS="$CXXFLAGS -O3"
-		CFLAGS="$CFLAGS -O3"
-	else
-		CXXFLAGS="$CXXFLAGS -O2"
-		CFLAGS="$CFLAGS -O2"
-	fi
 fi
 
 AC_ARG_WITH([gpt],
